﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    public class Repair
    {
        private readonly Aliyeye.Car.Net.Dal.Repair dal = new Aliyeye.Car.Net.Dal.Repair();
        public Repair() { }
        public int Add(Model.Repair model)
        {
            return dal.Add(model);
        }
        public bool Update(Model.Repair model)
        {
            return dal.Update(model);
        }
        public bool Delete(int Id)
        {
            return dal.Delete(Id);
        }
        public Model.Repair GetModel(int Id)
        {
            return dal.GetModel(Id);
        }

        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

         /// <summary>
        /// 还车结算时，统计车辆维修价格总计
        /// </summary>
        /// <param name="carCode"></param>
        /// <param name="beginTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public decimal GetSumPriceByCarCode(string carCode, DateTime beginTime, DateTime endTime)
        {
            return dal.GetSumPriceByCarCode(carCode, beginTime, endTime);
        }
    }
}
